<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="/res/front/css/sytle/businessPage-css/calculator.css" />
<script type="text/javascript" src="/res/front/js/js/jquery.js"></script>
<script type="text/javascript">
function check(){
	var jo=/^[0-9]*[1-9][0-9]*$/;
	if($("#borrow").val() == ""){
		$("#borrowId").html("不能为空");
		return false;
	}else if(!jo.test($("#borrow").val())){
		$("#borrowId").html("只能输入整数");
		return false;
	}else{
		$("#borrowId").html('');
	}
	
	var jo1=/^\d+\.?\d*$/;
	if($("#rate").val() == ""){
		$("#rateId").html("不能为空");
		return false;
	}else if(!jo1.test($("#rate").val())){
		$("#rateId").html("只能输入数字");
		return false;
	}else{
		$("#rateId").html('');
	}
	
	if($("#month").val() == ""){
		$("#monthId").html("不能为空");
		return false;
	}else if(!jo.test($("#month").val())){
		$("#monthId").html("只能输入整数");
		return false;
	}else{
		$("#monthId").html('');
	}
	return true;
}

</script>
<title>利息计算器 - ${title}</title>
<#include "/front/head.html"/>
</head>

<body> 
    <#include "/front/common/header.html"/>
<#if !opr??>
<!-- 中部 -->
    <div class="calculator_main">
    	<div class="calculator_centre">
        	<div class="calculator_tab">
            	<div class="calculator_header">
                	<b>利息计算器</b>
                </div>
                <div class="calculator_count_table">
                	<form action="/v_jsq1.jspx" method="post" onsubmit="return check();">
                        <table width="600" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="right">金额&nbsp;&nbsp;</td>
                                <td><input type="text" id="borrow" name="p" class="" />元</td>
                                <td width="80" align="right">年利率&nbsp;&nbsp;</td>
                                <td><input type="text" id="rate" name="r" />%</td>
                            </tr>
                            <tr>
                                <td height="30">&nbsp;</td>
                                <td id="borrowId" style="color:#F00;"></td>
                                <td>&nbsp;</td>
                                <td id="rateId" style="color:#F00;"></td>
                            </tr>
                            <tr>
                            	<td height="30" align="right">期限&nbsp;&nbsp;</td>
                                <td><input type="text" id="month" name="n" />月</td>
                                <td align="right">还款方式&nbsp;&nbsp;</td>
                                <td>
                                	<select name="selects">
                                    	<option value="1">等额本息</option>
                                    	<option value="2">每月付息到期还本</option>
                                    </select>
                                </td> 
                            </tr>
                            <tr>
                            	<td height="30">&nbsp;</td>
                                <td id="monthId" style="color:#F00;"></td>
                                <td colspan="2">&nbsp;</td>
                            </tr>
                            <tr>
                            	<td align="center" colspan="4"><input type="submit" id="" name="" value="计&nbsp;&nbsp;算" class="calcu_inp_2" /></td>
                            </tr>
                        </table>
                    </form>
            	</div>
                <div class="calculator_header">
                    <b>融资收费情况</b>
                </div>
                <div class="calculator_service_table">
                	<div class="cal_title_header">借款服务费</div>
                	<table width="650px" cellpadding="0" cellspacing="0">
                        <tr>
                        	<td align="left">信用等级</td>
                            <td width="70" height="45" align="center"><img src="../../../res/front/img/imagesForFront/AA.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/A.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/B.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/C.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/D.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/E.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/HR.png" border="0" /></td>
                        </tr>
                        <tr>
                        	<td align="left">费率</td>
                            <#list list1 as c1>
							 <td height="45" align="center">${c1.rates!*100}%</td>
							 <#if c1_index==6><#break></#if>
                        </#list>
                        </tr>
                        <tr>
                        	<td align="left">实际费用</td>
                        </tr>
                    </table>
                </div>
</#if>
<#if opr ??>
    <!-- 中部 -->
    <div class="calculator_main">
    	<div class="calculator_centre">
        	<div class="calculator_tab">
            	<div class="calculator_header">
                	<b>利息计算器</b>
                </div>
                <div class="calculator_count_table">
                	<form action="v_jsq1.jspx" method="post" onsubmit="return check();">
                        <table width="600" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="right">金额&nbsp;&nbsp;</td>
                                <td><input type="text" id="borrow" name="p" value="${p123}" class="" />元</td>
                                <td width="80" align="right">年利率&nbsp;&nbsp;</td>
                                <td><input type="text" id="rate" name="r" value="${r123*100}" />%</td>
                            </tr>
                            <tr>
                                <td height="30">&nbsp;</td>
                                <td id="borrowId" style="color:#F00;"></td>
                                <td>&nbsp;</td>
                                <td id="rateId" style="color:#F00;"></td>
                            </tr>
                            <tr>
                            	<td height="30" align="right">期限&nbsp;&nbsp;</td>
                                <td><input type="text" id="month" name="n" value="${n123!}" />月</td>
                                <td align="right">还款方式&nbsp;&nbsp;</td>
                                <td>
                                <#if opr=="num1">
                                	<select name="selects">
                                    	<option value="1" selected="selected" >等额本息</option>
                                    	<option value="2">每月付息到期还本</option>
                                    </select>
                                </#if>
                                <#if opr=="num2">
                                	<select name="selects">
                                    	<option value="1">等额本息</option>
                                    	<option value="2"  selected="selected" >每月付息到期还本</option>
                                    </select>
                                </#if>
                                </td> 
                            </tr>
                            <tr>
                            	<td height="30">&nbsp;</td>
                                <td id="monthId" style="color:#F00;"></td>
                                <td colspan="2">&nbsp;</td>
                            </tr>
                            <tr>
                            	<td align="center" colspan="4"><input type="submit" id="" name="" value="计&nbsp;&nbsp;算" class="calcu_inp_2" /></td>
                            </tr>
                        </table>
                    </form>
            	</div>
            	<#if opr=="num1">
                <div class="calculator_describe_table">
                	<div class="cal_title_header">还款（收回）描述</div>
                    <table width="680">
                    	<tr>
                        	<td height="30" align="left">每月还/收本息</td>
                            <td align="center">#{payPerMonth!;m2M2}元</td>
                            <td align="center">您将在${n123}个月后还清借款/收回全部本息</td>
                        </tr>
                    </table>
                </div>
                <div class="calculator_refundtime_table">
                	<div class="cal_title_header">还款（收回）时间表</div>
                    <table width="100%">
                    	<tr align="center">
                        	<td height="40">月份</td>
                            <td>月还/收本息</td>
                            <td>月还/收本金</td>
                            <td>月还/收利息</td>
                            <td>待还/收本金余额</td>
                        </tr>
                        <#list list as c>
                        <tr align="center">
							 <td>${c.Mouth!}月</td>
							 <td>#{c.payPerMonth!;m2M2}</td>
							 <td>#{c.principalMonth!;m2M2}</td>
							 <td>#{c.interestMonth!;m2M2}</td>
							 <td>#{c.residue!;m2M2}</td>
                        </tr>
                        </#list>
                    </table>
                </div>
                </#if>
             	<#if opr=="num2">
             	<div class="calculator_describe_table">
                	<div class="cal_title_header">还款（收回）描述</div>
                    <table width="680">
                    	<tr>
                        	<td height="30" align="left">每月还/收本息</td>
                            <td align="center">#{interestMonth!;m2M2}元</td>
                            <td align="center">您将在${n123}个月后还清借款/收回全部本息</td>
                        </tr>
                    </table>
                </div>
                <div class="calculator_refundtime_table">
                	<div class="cal_title_header">还款（收回）时间表</div>
                    <table width="100%">
                    	<tr align="center">
                        	<td height="40">月份</td>
                            <td>月还/收本息</td>
                            <td>月还/收本金</td>
                            <td>月还/收利息</td>
                            <td>待还/收本息余额</td>
                        </tr>
                        <#list list as c>
                        <tr align="center">
							 <td>${c.Mouth!}月</td>
							 <td>#{c.payPerMonth!;m2M2}</td>
							 <td>#{c.principalMonth!;m2M2}</td>
							 <td>#{c.interestMonth!;m2M2}</td>
							 <td>#{c.lastBalance!;m2M2}</td>
                        </tr>
                        </#list>
                    </table>
                </div>
             	</#if>
                <div class="calculator_header">
                    <b>融资收费情况</b>
                </div>
                <div class="calculator_service_table">
                	<div class="cal_title_header">借款服务费</div>
                	<table width="650px" cellpadding="0" cellspacing="0">
                        <tr>
                        	<td align="left">信用等级</td>
                            <td width="70" height="45" align="center"><img src="../../../res/front/img/imagesForFront/AA.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/A.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/B.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/C.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/D.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/E.png" border="0" /></td>
                            <td width="70" align="center"><img src="../../../res/front/img/imagesForFront/HR.png" border="0" /></td>
                        </tr>
                        <tr>
                        	<td align="left">费率</td>
                            <#list list1 as c1>
							 <td height="45" align="center">${c1.rates!*100}%</td>
							 <#if c1_index==6><#break></#if>
                        </#list>
                        </tr>
                        <tr>
                        	<td align="left">实际费用</td>
                             <#list list1 as c1>
							 <td height="45" align="center">#{(c1.rates!*p123);m2M2}</td>
							 <#if c1_index==6><#break></#if>
                        	 </#list>
                        </tr>
                    </table>
                    

                </div>
                <div class="calculator_adve_fee_div">
                    	<span class="cal_title_header">借款管理费</span>
                        <span style="width:200px; text-align:center;">每月付${a123}元</span>
                        <span style="width:200px; text-align:center;">共付${a222}元</span>
                    </div>
</#if>
                <div class="calculator_hint_div">
                	<p><samp style="color:#FF9A00;">等额本息</samp>：即融资人每月以相等的金额偿还借款本息，也是银行房贷等采用的方法。因计算中存在四舍五入，最后一期还款金额与之前略有不同。</p>
                    <p><samp style="color:#FF9A00;">每月付息，到期还本</samp>：即融资人每月偿还固定利息，最后一期偿还全部本金。</p>
                    <p><samp style="color:#FF9A00;">使用利息计算器，能帮您计算每月的本息情况；同时，一份完整的本息偿还时间表，让您能更直观地了解还款本息详情。</samp></p>
                </div>
        	</div>
        </div>
    </div>
    <#include "/front/common/footer.html"/>
</body>
</html>
